﻿using System;
using System.IO;
using System.Globalization;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Author: Miroslav Matula m.matula@alutam.cz 
// Date : 9.9.2010
namespace Slma.OData.Factory
{
  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  public class EntityPropertyDef
	{
		public Type PropertyType { get; set; }
		public string PropertyName { get; set; }
		public int MaxLength { get; set; }
		public bool AllowDBNull { get; set; }
    public bool Validate { get; set; }
		public object tag;
	}
  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  public class EntityPropertyDefList : System.Collections.Generic.List<EntityPropertyDef>
  {
    public int OrderOf(string propertyName_)
    {
      int idx = 0;
      foreach(EntityPropertyDef co in this) {
        if(co.PropertyName == propertyName_) { return idx; }
        idx++;
      }
      throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resource.NotFindProperty, propertyName_), "propertyName_");
    }
  }
  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++


}
